<?php

Route::group([
    'prefix' => 'admin',
    'middleware' =>'auth.admin',
], function () {
    Route::get('channel/source-list', [
        'as' => 'AdminSourceList',
        'alias' => '渠道来源列表',
        'uses' => 'Admin\ChannelSourceController@showSourceList'
    ]);

    Route::get('channel/source-edit', [
        'as' => 'AdminSourceEdit',
        'alias' => '渠道来源编辑',
        'uses' => 'Admin\ChannelSourceController@showSourceEdit'
    ]);

    Route::post('channel/source-edit', [
        'as' => 'AdminSourceEditAction',
        'alias' => '渠道来源编辑保存',
        'uses' => 'Admin\ChannelSourceController@saveSourceEdit'
    ]);

    Route::get('channel/statistics', [
        'as' => 'AdminSourceStatistics',
        'alias' => '渠道数据统计',
        'uses' => 'Admin\ChannelSourceController@showSourceStatistics'
    ]);

    Route::get('channel/get-all', [
        'as' => 'AdminSourceGetAll',
        'alias' => '获取所有渠道',
        'uses' => 'Admin\ChannelSourceController@getAll'
    ]);

    Route::get('channel/statistics-excel', [
        'as' => 'AdminSourceStatisticsExcel',
        'alias' => '渠道数据统计导出',
        'uses' => 'Admin\ChannelSourceController@excel'
    ]);
});